package geppetto.phraseTable.phrase.feature;

public class ReorderingFeature extends AbstractFeature{
	double[] weights;

	public ReorderingFeature(double[] weights) {
		super();
		this.weights = weights;
	}


	@Override
	public String toMosesFormat() {
		String ret = "";
		for(double w : weights){
			ret += convertDoubleToMosesFormat(w) + " ";
		}
		return ret;
	}

	// direction prev = 0, next = 1
	// orientation mono = 0, swap = 1, other = 2
	public double get(int direction, int orientation){
		return weights[direction * 3 + orientation];
	}
}
